// pages/My/HelpCenter/HelpCenter.js
var url = wx.getStorageSync('url')
var shopid = wx.getStorageSync('shopid')
var userId = wx.getStorageSync('userId')
var openid = wx.getStorageSync('openid')
var time_ss = wx.getStorageSync('time_ss')

Page({

  /**
   * 页面的初始数据
   */
  data: {
   
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var shopid = wx.getStorageSync('shopid')
    var userId = wx.getStorageSync('userId')
    var openid = wx.getStorageSync('openid')
    var time_ss = wx.getStorageSync('time_ss')

    var that = this
    that.setData({
      currentTab: 0,
      currentTab1:0,
      currentTab2:0
    })

    // 获取
    wx.showLoading({
      title: '加载中',
    })
    wx.request({
      url: url+'sharkActivity/fetchQA',
      data: {
        "type": 1,
        "seq": "232312313",
        "sysVer": "0.0.1",
        "sendTime": time_ss,
        "userId": userId,
        "resId": "0000",
        "privId": "0000",
        "platform": 2,
        "shopId": shopid,
        "userType": 1,
        "source": 1,
        "content": {
          "shopId": shopid
        }
      },
      method: "POST",
      header: { "Content-Type": "application/json" },
      success: function (e) {
        wx.hideLoading()
        console.log(e.data.content)
        that.setData({
          datas : e.data.content
        })
      }
    })
  },
  swichNav:function(e){
    console.log(e.currentTarget.dataset.current)
    var i = e.currentTarget.dataset.current
    var that = this
    that.setData({
      currentTab:i,
      currentTab1:i,
      currentTab2:i
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})